<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>DeathGhost-用户中心</title>
		<meta name="keywords" content="DeathGhost,DeathGhost.cn,web前端设,移动WebApp开发" />
		<meta name="description" content="DeathGhost.cn::H5 WEB前端设计开发!" />
		<meta name="author" content="DeathGhost" />
		<link href="style/style.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/public.js"></script>
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/jqpublic.js"></script>
		<script type="text/javascript" src="/webjars/jquery/3.4.1/jquery.min.js"></script>
		<script type="text/javascript">
			$(function() {
				function getList(){
					$.ajax({
					url: "/order/lookOrder",
					type: "get",
					data: "",
					dataType: "json",
					success: function(data) {
						$(".Myorder").html("")
						$(".Myorder").append($('<th class="Font14 FontW">订单编号</th> <th class="Font14 FontW">下单时间</th><th class="Font14 FontW">订单总金额</th><th class="Font14 FontW">订单状态</th><th class="Font14 FontW">操作</th>'))
						$.each(data, function(dindex, v) {
							$(".Myorder").append(
								$("<tr></tr>")
								.append($("<td class='FontW'></td>").html($("<a></a>").html(v.orderId).attr("href", "user_order.html?id=" + v.orderId)))
								.append($("<td></td>").html(v.addTime))
								.append($("<td></td>").html(v.totalMoney))
								.append($("<td></td>").html(v.status == 1 ? "未支付" : "已支付"))
								.append($("<td id='"+v.orderId+"'></td>").html(v.status == 1 ? $("<a href='javascript:void(0)' class='pay'>去支付</a> | <a href='javascript:void(0)' class='calOrder'>取消订单</a>") : $("<a href='javascript:void(0)' class='delOrder'>删除订单</a>")))
							)
						});
						$(".delOrder").bind("click",function(){
							$.ajax({
								url:"/order/cleOrder",
								type:"get",
								data:{"orderId":$(this).parent().attr("id")},
								dataType:"json",
								success:function(data){
									if(data==1){
										alert("删除成功")
										getList();
									}
								}
							})
						})
						$(".pay").bind("click",function(){
							/*$.ajax({
								url:"/order/payOrder",
								type:"post",
								data:{
									"orderId":$(this).parent().attr("id"),
									"total":$(this).parent().prev().prev().html()},
								dataType:"json",
								success:function(data){
								}
							})*/
							$("#orderId").val($(this).parent().attr("id"));
							$("#total").val($(this).parent().prev().prev().html());
							$("#payform").submit();
							window.opener = null;window.close();
						})
					}
				})
				}
				getList();
			})
		</script>
		<!--
Author: DeathGhost
Author URI: http://www.deathghost.cn
-->
	</head>

	<body>
		<header>
			<section class="Topmenubg">
				<div class="Topnav">
					<div class="LeftNav">
						<a href="register.html">注册</a>/
						<a href="login.html">登录</a>
						<a href="#">QQ客服</a>
						<a href="#">微信客服</a>
						<a href="#">手机客户端</a>
					</div>
					<div class="RightNav">
						<a href="user_center.html">用户中心</a>
						<a href="user_orderlist.html" target="_blank" title="我的订单">我的订单</a>
						<a href="cart.html">购物车（0）</a>
						<a href="user_favorites.html" target="_blank" title="我的收藏">我的收藏</a>
						<a href="#">商家入驻</a>
					</div>
				</div>
			</section>
			<div class="Logo_search">
				<div class="Logo">
					<img src="images/logo.jpg" title="DeathGhost" alt="模板">
					<i></i>
					<span>西安市 [ <a href="#">莲湖区</a> ]</span>
				</div>
				<div class="Search">
					<form method="get" id="main_a_serach" onsubmit="return check_search(this)">
						<div class="Search_nav" id="selectsearch">
							<a href="javascript:;" onClick="selectsearch(this,'restaurant_name')" class="choose">餐厅</a>
							<a href="javascript:;" onClick="selectsearch(this,'food_name')">食物名</a>
						</div>
						<div class="Search_area">
							<input type="search" id="fkeyword" name="keyword" placeholder="请输入您所需查找的餐厅名称或食物名称..." class="searchbox" />
							<input type="submit" class="searchbutton" value="搜 索" />
						</div>
					</form>
					<p class="hotkeywords">
						<a href="#" title="酸辣土豆丝">酸辣土豆丝</a>
						<a href="#" title="这里是产品名称">螃蟹炒年糕</a>
						<a href="#" title="这里是产品名称">牛奶炖蛋</a>
						<a href="#" title="这里是产品名称">芝麻酱凉面</a>
						<a href="#" title="这里是产品名称">滑蛋虾仁</a>
						<a href="#" title="这里是产品名称">蒜汁茄子</a>
					</p>
				</div>
			</div>
			<nav class="menu_bg">
				<ul class="menu">
					<li>
						<a href="index.html">首页</a>
					</li>
					<li>
						<a href="list.html">订餐</a>
					</li>
					<li>
						<a href="category.html">积分商城</a>
					</li>
					<li>
						<a href="article_read.html">关于我们</a>
					</li>
				</ul>
			</nav>
		</header>
		<!--Start content-->
		<section class="Psection MT20">
			<nav class="U-nav Font14 FontW">
				<ul>
					<li><i></i>
						<a href="user_center.html">用户中心首页</a>
					</li>
					<li><i></i>
						<a href="user_orderlist.html">我的订单</a>
					</li>
					<li><i></i>
						<a href="user_address.html">收货地址</a>
					</li>
					<li><i></i>
						<a href="user_message.html">我的留言</a>
					</li>
					<li><i></i>
						<a href="user_coupon.html">我的优惠券</a>
					</li>
					<li><i></i>
						<a href="user_favorites.html">我的收藏</a>
					</li>
					<li><i></i>
						<a href="user_account.html">账户管理</a>
					</li>
					<li><i></i>
						<a href="#">安全退出</a>
					</li>
				</ul>
			</nav>
			<article class="U-article Overflow">
				<!--user order list-->
				<section>
					<table class="Myorder">
						<th class="Font14 FontW">订单编号</th>
						<th class="Font14 FontW">下单时间</th>
						<th class="Font14 FontW">收件人</th>
						<th class="Font14 FontW">订单总金额</th>
						<th class="Font14 FontW">订单状态</th>
						<th class="Font14 FontW">操作</th>
						<!--<tr>
      <td class="FontW"><a href="user_order.html">201409225367</a></td>
      <td>2014-09-22 19:21:38</td>
      <td>DeathGhost</td>
      <td>￥328.00</td>
      <td>未付款,未发货</td>
      <td><a href="#">取消订单</a> | <a href="#">付款</a></td>
     </tr>-->
					</table>
					<div class="TurnPage">
						<a href="#">
							<span class="Prev"><i></i>首页</span>
						</a>
						<a href="#"><span class="PNumber">1</span></a>
						<a href="#"><span class="PNumber">2</span></a>
						<a href="#">
							<span class="Next">最后一页<i></i></span>
						</a>
					</div>
					<div>
						<form id="payform" name='alipayment' action="/order/payOrder" method="post" target="_blank" style="display: none;">
							<!--订单号-->
							<input id="orderId" name="orderId" />
							<!--订单名称-->
							<!--<input id="WIDsubject" name="WIDsubject" />-->
							<!--订单金额-->
							<input id="total" name="total" />
						</form>
					</div>
				</section>
			</article>
		</section>
		<!--End content-->
		<div class="F-link">
			<span>友情链接：</span>
			<a href="http://www.htmlsucai.com" target="_blank" title="DeathGhost">DeathGhost</a>
			<a href="http://www.htmlsucai.com" target="_blank" title="免费后台管理模板">绿色清爽版通用型后台管理模板免费下载</a>
			<a href="http://www.htmlsucai.com" target="_blank" title="果蔬菜类模板源码">HTML5果蔬菜类模板源码</a>
			<a href="http://www.htmlsucai.com" target="_blank" title="黑色的cms商城网站后台管理模板">黑色的cms商城网站后台管理模板</a>
		</div>
		<footer>
			<section class="Otherlink">
				<aside>
					<div class="ewm-left">
						<p>手机扫描二维码：</p>
						<img src="images/Android_ico_d.gif">
						<img src="images/iphone_ico_d.gif">
					</div>
					<div class="tips">
						<p>客服热线</p>
						<p><i>1830927**73</i></p>
						<p>配送时间</p>
						<p><time>09：00</time>~<time>22:00</time></p>
						<p>网站公告</p>
					</div>
				</aside>
				<section>
					<div>
						<span><i class="i1"></i>配送支付</span>
						<ul>
							<li>
								<a href="article_read.html" target="_blank" title="标题">支付方式</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">配送方式</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">配送效率</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">服务费用</a>
							</li>
						</ul>
					</div>
					<div>
						<span><i class="i2"></i>关于我们</span>
						<ul>
							<li>
								<a href="article_read.html" target="_blank" title="标题">招贤纳士</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">网站介绍</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">配送效率</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">商家加盟</a>
							</li>
						</ul>
					</div>
					<div>
						<span><i class="i3"></i>帮助中心</span>
						<ul>
							<li>
								<a href="article_read.html" target="_blank" title="标题">服务内容</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">服务介绍</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">常见问题</a>
							</li>
							<li>
								<a href="article_read.html" target="_blank" title="标题">网站地图</a>
							</li>
						</ul>
					</div>
				</section>
			</section>
			<div class="copyright">(c) 版权所有 2016 DeathGhost 技术支持：
				<a href="http://www.htmlsucai.com" title="DeathGhost">DeathGhost</a>
			</div>
		</footer>
	</body>

</html>